﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using PBOffice.BLL;

public partial class MsgMng_MailDetail : System.Web.UI.Page
{
	protected void Page_Load()
	{
		int id;
		if (int.TryParse(Request.QueryString["id"], out id))
		{
			using (var mmb = new MsgMngBLL())
			{
				dvMessage.DataSource = new PBOffice.DAL.Message[] { mmb.GetMessage(id) };
				dvMessage.DataBind();
				if (Request.QueryString["act"] == "read")
					mmb.SetMessageRead((Session["userManage"] as PBOffice.DAL.User).UserNo, id);
			}
		}

	}
}